<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <title>稻稻工厂后台管理</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/colorpicker.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/datepicker.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/uniform.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/select2.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/matrix-style.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/matrix-media.css" />
    <link rel="stylesheet" href="/thinkphp/Public/admin/css/bootstrap-wysihtml5.css" />
    <link href="/thinkphp/Public/admin/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href='http://fonts.useso.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
    <script src="/thinkphp/Public/admin/js/jquery.min.js"></script>
    <style>
        .floatWindow{
            background:#000;
            width:100%;
            height:110%;
            position: absolute;
            z-index:999;
            /* older safari/Chrome browsers */
            -webkit-opacity: 0.8;
            /* Netscape and Older than Firefox 0.9 */
            -moz-opacity: 0.8;
            /* Safari 1.x (pre WebKit!) 老式khtml内核的Safari浏览器*/
            -khtml-opacity: 0.8;
            /* IE9 + etc...modern browsers */
            opacity: .8;
            /* IE 4-9 */
            filter:alpha(opacity=80);
            /*This works in IE 8 & 9 too*/
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
            /*IE4-IE9*/
            filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
            color:#FFFFFF;
            display:none;
        }
        .floatWindow ul{
            margin:0 auto;
            list-style:none;
            width:90%;
            margin-top:5%;
        }
        .floatWindow ul li{
            margin-top:20px;
            font-size:12px;
            color:#939DA8;
        }
        .floatWindow ul li span{
            width:100%;
            float:left;
            color:#FFFFFF;;
            font-weight:900;
            font-size:12px;
            text-align: center;;
        }
    </style>
</head>

<body>
<!--Header-part-->
<div id="header">
  <h1><a href="dashboard.html">稻道工厂</a></h1>
</div>
<!--close-Header-part--> 

<!--top-Header-menu-->
<div id="user-nav" class="navbar navbar-inverse">
  <ul class="nav">
        <li class=""><a title="" href="<?php echo U('Login/index');?>"><i class="icon icon-cog"></i> <span class="text">欢迎 <?php echo ($AdminUser); ?></span></a></li>
        <li class=""><a title="" href="<?php echo U('Login/index');?>"><i class="icon icon-cog"></i> <span class="text">登录</span></a></li>
        <li class=""><a title="" href="<?php echo U('Login/outLogin');?>"><i class="icon icon-share-alt"></i> <span class="text">登出</span></a></li>
  </ul>
</div>
<!--sidebar-menu-->
<div id="sidebar">
  <ul>
    <li>
        <a href="#"><i class="icon icon-list"></i> <span>用户</span></a>
    </li>
    <ul>
        <li><a href="<?php echo U('User/index');?>">用户</a></li>
    </ul>
    <li>
        <a href="#"><i class="icon icon-list"></i> <span>商品</span></a>
    </li>
    <ul>
        <li><a href="<?php echo U('Goods/index');?>">列表</a></li>
        <li><a href="<?php echo U('Goods/addGoods');?>">添加</a></li>
    </ul>

    <li>
        <a href="#"><i class="icon icon-list"></i> <span>栏目</span></a>
    </li>
    <ul>
    <!--<li><a href="<?php echo U('Cate/index');?>">列表</a></li>-->
        <li><a href="<?php echo U('Cate/addCate');?>">添加</a></li>
    </ul>

    <li>
        <a href="#"><i class="icon icon-list"></i><span>订单</span></a>
    </li>
    <ul>
      <li>
          <a href="<?php echo U('Order/index');?>">查看订单列表</a>
      </li>
    </ul>

    <li>
        <a href="#"><i class="icon icon-list"></i> <span>后台管理</span></a>
    </li>
    <ul>
        <li><a href="<?php echo U('Manage/index');?>">人员</a></li>
    </ul>

    <li>
        <a href="#"><i class="icon icon-list"></i> <span>商户</span></a>
    </li>
    <ul>
        <li><a href="<?php echo U('BusinessMan/index');?>">商户列表</a></li>
        <li><a href="<?php echo U('BusinessMan/addMan');?>">添加商户</a></li>
    <!--<li><a href="<?php echo U('BusinessMan/auth');?>">权限</a></li>-->
    </ul>
</div>

<!--close-left-menu-stats-sidebar-->

<div id="content">
    <div class="buttons">
        <div class="modal hide" id="modal-add-event">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h3>上传图集(可多选图片)</h3>
            </div>

            <form action="" method="post" enctype="multipart/form-data" id="upMoreImg">
                <div class="modal-body">
                    <p>
                        <input id="fileImage" type="file" size="30" name="files[]" multiple />

                    </p>
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn" data-dismiss="modal">Cancel</a>
                    <input type="submit" id="add-event-submit" class="btn btn-primary" value="上传">
                </div>
            </form>
        </div>
    </div>



    <div class="container-fluid">
    <hr>

    <div class="row-fluid">
      <div class="span12">

          <div class="controls controls-row">
              <form action="<?php echo U('Goods/index');?>" method="post" id="getCond">
                  <select name="cate_id" class="span3" onchange="getCond()">
                      <option value="null" selected="selected"> -- 选择栏目 ---</option>
                      <option value="all">全部商品</option>
                      <?php if(is_array($cate)): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>

                  </select>
              </form>
          </div>
          <script>
              function getCond()
              {
                  var one=$("select[name='cate_id']").val();
                  if(one!="null")
                  {
                      $("#getCond").submit();
                  }
              }
          </script>

        <div class="widget-box">
          <div class="widget-title">
              <span class="icon">
                <input type="checkbox" id="title-checkbox" name="title-checkbox" />
            </span>
            <h5>Static table with checkboxes</h5>
          </div>
          <div class="widget-content nopadding">
            <table class="table table-bordered table-striped with-check">
                  <thead>
                        <tr>
                            <th><i class="icon-resize-vertical"></i></th>
                            <th>排序</th>
                            <th>ID</th>
                            <th>商品编码</th>
                            <th>名称</th>
                            <th>updateTime</th>
                            <th>操作</th>
                        </tr>
                  </thead>

                <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tbody>
                        <tr>
                            <td><input type="checkbox" /></td>
                            <td><input class="span2" id="order<?php echo ($vo["id"]); ?>" name="order" type="text" value="<?php echo ($vo["order"]); ?>" data="<?php echo ($vo["id"]); ?>" onblur="order(<?php echo ($vo["id"]); ?>)"/></th>
                            <td><?php echo ($vo["id"]); ?></td>
                            <td><?php echo ($vo["goods_sn"]); ?></td>
                            <td class="center"><?php echo ($vo["name"]); ?></td>
                            <td><?php echo ($vo["last_update"]); ?></td>
                            <td>
                                <a href="<?php echo U('Goods/delGoods',array('id'=>$vo['id']));?>" class="btn btn-inverse btn-mini">删除</a>
                                <a href="<?php echo U('Goods/updataGoods',array('id'=>$vo['id']));?>" class="btn btn-inverse btn-mini">修改</a>
                                <a id="add-event" data-toggle="modal" href="#modal-add-event" class="btn btn-inverse btn-mini" onclick="upMoreImg('<?php echo U('Goods/upMoreImg/',array('id'=>$vo['id']));?>')">上传图集</a>
                            </td>
                        </tr>
                    </tbody><?php endforeach; endif; else: echo "" ;endif; ?>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="/thinkphp/Public/admin/js/fullcalendar.min.js"></script>
<script src="/thinkphp/Public/admin/js/matrix.calendar.js"></script>
<script src="/thinkphp/Public/admin/js/matrix.tables.js"></script>
<script>

    function order(id){
        var goodsID=id;
        var yanG1=$("#order"+id).val();

        $.ajax({
            url:"<?php echo U('Goods/sort');?>",

            type: 'POST',

            data:{
                goods_id:goodsID,
                sort_val:yanG1
            },

            dataType: 'html',

            timeout: 1000,

            error: function(){alert('Error loading PHP document');},

            success: function(result){
                alert(result);
            }
        });
    }
</script>

<!--Footer-part-->
<div class="row-fluid">
  <div id="footer" class="span12"> 2013 &copy; Matrix Admin. More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a> </div>
</div>
<!--end-Footer-part-->

<script src="/thinkphp/Public/admin/js/matrix.form_common.js"></script>
<script src="/thinkphp/Public/admin/js/jquery.ui.custom.js"></script>
<script src="/thinkphp/Public/admin/js/bootstrap.min.js"></script>
<script src="/thinkphp/Public/admin/js/bootstrap-colorpicker.js"></script>
<script src="/thinkphp/Public/admin/js/bootstrap-datepicker.js"></script>
<script src="/thinkphp/Public/admin/js/jquery.toggle.buttons.html"></script>
<script src="/thinkphp/Public/admin/js/masked.js"></script>
<script src="/thinkphp/Public/admin/js/jquery.uniform.js"></script>
<script src="/thinkphp/Public/admin/js/select2.min.js"></script>
<script src="/thinkphp/Public/admin/js/matrix.js"></script>
<script src="/thinkphp/Public/admin/js/wysihtml5-0.3.0.js"></script>
<script src="/thinkphp/Public/admin/js/jquery.peity.min.js"></script>
<script src="/thinkphp/Public/admin/js/bootstrap-wysihtml5.js"></script>
<script src="/thinkphp/Public/admin/js/jquery.dataTables.min.js"></script>
<script src="/thinkphp/Public/admin/js/yanGradyJS/yanGrady.js"></script>
<script>
    $('.textarea_editor').wysihtml5();
</script>
</body>
</html>